<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="description" content="ulthon_admin - 一款基于ThinkPHP6.0和Layui的快速开发的后台管理框架系统">
    <meta name="author" content="ulthon_admin">
    <meta name="keywords" content="tp6后台,curd后台,layui后台,ulthon_admin,ulthon_admin官网,thinkphp6.0框架,layui前端框架,后台快速开发框架,php框架">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>{:sysconfig('site','site.name')} </title>
    <link rel="stylesheet" href="//layui.ulthon.com/cdn/layui-ul.css">
    <link rel="stylesheet" href="__STATIC__/common/css/welcome.css">
    <link rel="stylesheet" href="/static/plugs/layui-v2.7.6/css/layui.css">
    <script src="/static/plugs/jquery-3.4.1/jquery-3.4.1.min.js"></script>
    <script src="/static/plugs/layui-v2.7.6/layui.js"></script>

    <style>
        .show-detial {
            cursor: pointer;
        }
    </style>
</head>

<body>
    <div id='app'>
        <!-- 头部-->
        <header>
            <!-- logo -->
            <p class="left logo-box">
                <i class="img-logo-header logo"></i>
                <a href="/">{:sysconfig('site','logo_title')}</a>
            </p>
            <div class="right">
                <!-- 导航-->
                <div class="navbar">
                    {foreach $navbar as $vo}
                    <a class="navbar-item {if $vo.active===true}active{/if}" href="{$vo.href}" target="{$vo.target}">{$vo.name}</a>
                    {/foreach}
                </div>

            </div>
        </header>

        <div class="home-main">
            <div class="title">
                <p class="desc">{$data.description|default=''|raw}</p>
                <p class="operation">
                    <a class="start" href="{:__url('admin/Index/index')}"> 进入后台</a>
                    <a class="gitee button-grya" target="_blank" href="https://gitee.com/augushong/cuda-compare"><i class="icon-gitee"></i>Gitee</a>
                </p>
            </div>
            <!-- 框架皮肤-->
            <div class="introduction">
                <!-- 特性标题-->
                <div class="top">
                    <div class="part-title">
                        <p class="text">性价比排行</p>
                        <p class="line"></p>
                    </div>
                    <div class="part-desc">

                        {volist name='list_type' id='item_type'}
                        <div style="width:200px;margin: 15px auto;" class="ul-section">
                            <div class="ul-title">
                                <div class="ul-title-main">
                                    {$item_type.title}
                                </div>
                                <div class="ul-title-line">
                                </div>
                            </div>
                        </div>
                        <table class="layui-table show-table" style="text-align: left;">
                            <thead>
                                <tr>
                                    <th>显卡名称</th>
                                    <th>CUDA核心数</th>
                                    <th>显存</th>
                                    <th>报价类型</th>
                                    <th>报价</th>
                                    <th>性价比（单核价格）</th>
                                    <th>报价链接</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                {volist name='$item_type.list_order' id='vo'}
                                <tr class='item' data-id="{$vo.id}" data-url="/price/{$vo.id}">
                                    <td>{$vo.appGpu.title}</td>
                                    <td>{$vo.appGpu.cuda_count}</td>
                                    <td>{$vo.appGpu.memory}</td>
                                    <td>{$vo.type_title}</td>
                                    <td>{$vo.price}</td>
                                    <td>{$vo.cost_price}</td>
                                    <td>
                                        {empty name='vo.link'}

                                        <span>{$vo.title}</span>
                                        {else /}
                                        <a target="_blank" href="{$vo.link|raw}">{$vo.title}</a>
                                        {/empty}
                                    </td>
                                    <td>
                                        <div class="show-detial">详情</div>
                                    </td>
                                </tr>
                                {/volist}
                            </tbody>
                        </table>
                        {/volist}
                    </div>
                </div>

            </div>

        </div>

        <div class="introduction">
            <!-- 特性标题-->
            <div class="top">
                <div class="part-title">
                    <p class="text">免责声明</p>
                    <p class="line"></p>
                </div>
                <p class="part-desc">本站基于ulthon_admin开发。如有侵权，请联系service@ulthon.com。</p>
                <p class="part-desc">本站仅提供一个便于统计和计算报价的平台，如发现有侵权、违规内容，请立即反馈，我们会第一时间处理。</p>
            </div>

        </div>
    </div>

    <!-- 底部-->
    <footer class="site-footer">
        <div class="container">
            <p class="protocol">遵循 木兰 开源协议 </p>
            <p class="beian-number">Copyright © （填你自己的）版权所有，并保留所有权利 | <a target="_blank" href="http://www.miitbeian.gov.cn">（填你自己的）</a></p>
            <p>Site designed by <a href="https://gitee.com/ulthon" target="_blank">ulthon</a></p>
        </div>
    </footer>

    {:ua_htmlspecialchars_decode(sysconfig('site','site_js_insert'))}

    <script>

        $('.show-detial').click(function () {
            var url = $(this).closest('.item').data('url')

            var width = ($(window).width() - $(this).closest('.show-table').width()) / 2

            if (width < 440) {
                width = 440
            }

            if (window.lastDetialPage) {
                layer.close(window.lastDetialPage)
            }

            window.lastDetialPage = layer.open({
                type: 2,
                content: url,
                area: [width + 'px', '100%'],
                offset: 'l',
                shade: 0,
                anim: 2,
                title: '报价详情'
            })
        })
    </script>

</body>

</html>